// Bart Stukken & Joost Vangoidsenhoven
#include "CardGroup.h"

CardGroup::CardGroup()
{

}

CardGroup::CardGroup(const CardGroup& rhs): cards(rhs.cards)
{
}

CardGroup::~CardGroup()
{
}


void CardGroup::SetCard(const Card& card, unsigned int index)
{
	if (index >= cards.size())
		throw "CardGroup: index out of bounds";

	cards.at(index) = card;	
}

const Card& CardGroup::GetCard(unsigned int index) const
{
	if (index >= cards.size())
		throw "CardGroup: index out of bounds";

	return cards.at(index);
}

void CardGroup::AddCard(const Card& card)
{
	cards.push_back(card);
}

void CardGroup::RemoveCard(unsigned int index)
{
	if (index >= cards.size())
		throw "CardGroup: index out of bounds";

	cards.erase(cards.begin() + index);
}

unsigned int CardGroup::Size() const
{
	return cards.size();
}